package com.probox.common.core.enums;

public enum BackStatusEnum {
    //0商家拒绝退款/1等待商家审核/2商家发起退款/3商家退款成功/4商家退款失败
    refuse("0","商家拒绝退款"),
    wait("1","等待商家审核"),
    fundApply("2","商家发起退款"),
    success("3","商家退款成功"),
    fail("4","商家退款失败");

    private BackStatusEnum(String k, String v) {
        this.setKey(k);
        this.setValue(v);
    }

    public static String getNameByKey(String key) {
        String rst = "";
        for(BackStatusEnum oe: BackStatusEnum.values()) {
            if (oe.getKey().equals(key)) {
                rst = oe.getValue();
            }
        }
        return rst;
    }

    private String key;
    private String value;

    public String getKey() {
        return key;
    }
    public void setKey(String key) {
        this.key = key;
    }
    public String getValue() {
        return value;
    }
    public void setValue(String value) {
        this.value = value;
    }
}
